package com.fuyao.cloud.asset.vo.card;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fuyao.cloud.common.core.annotation.ValidationDate;
import com.fuyao.cloud.common.core.annotation.ValidationDateTime;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Digits;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * 资产分类导出类
 *
 * @author lyhil
 * @date 2021/11/17
 */
@Data
@ColumnWidth(25)
@ApiModel(value = "资产信息导入类")
public class AssetCardImportVO {

    @ExcelProperty(value = "资产编码")
    private String number;

    @NotBlank(message = "资产名称不能为空！")
    @ExcelProperty(value = "资产名称")
    private String name;

    @NotBlank(message = "资产类型编码不能为空！")
    @ExcelProperty(value = "资产类型编码")
    private String ctiCode;

    @NotBlank(message = "所属单位全名称不能为空")
    @ExcelProperty(value = "所属单位全名称")
    private String belongdept;

    @NotBlank(message = "购入日期不能为空！")
    @ValidationDate(message = "购入日期格式不正确")
    @ExcelProperty(value = "购入日期")
    private String buyDate;

    @ExcelProperty(value = "使用单位全名称")
    private String usedept;

    @ExcelProperty(value = "使用人")
    private String useName;

    @NotBlank(message = "金额不能为空")
    @Pattern(regexp = "^[0-9]+\\.{0,1}[0-9]{0,2}$", message = "只能输入整数或者小数")
    @ExcelProperty(value = "金额")
    private String amount;

    @NotBlank(message = "规格型号编码不能为空！")
    @ExcelProperty(value = "规格型号")
    private String model;

    @NotBlank(message = "计量单位不能为空！")
    @ExcelProperty(value = "计量单位")
    private String unit;

    @ExcelProperty(value = "存放地编码")
    private String locationCode;

    @ExcelProperty(value = "存放地点")
    private String location;

    @ExcelProperty(value = "供应商")
    private String supplier;

    @ExcelProperty(value = "供应商联系人")
    private String supplierUser;

    @ExcelProperty(value = "供应商联系电话")
    private String supplierPhone;

    @ValidationDate(message = "维保到期格式不正确")
    @ExcelProperty(value = "维保到期")
    private String maintenanceDate;

    @ExcelProperty(value = "备注")
    private String remarks;

    @ExcelProperty(value = "SN号")
    private String sn;

    @NotNull(message = "原值不能为空！")
    @Pattern(regexp = "^[0-9]+\\.{0,1}[0-9]{0,2}$", message = "只能输入整数或者小数")
    @ExcelProperty(value = "原值")
    private String originalAmount;

    @Pattern(regexp = "^[0-9]+\\.{0,1}[0-9]{0,2}$", message = "只能输入整数或者小数")
    @NotNull(message = "使用期限不能为空! ")
    @ExcelProperty(value = "使用期限(月)")
    private String usefulLife;

    /**
     * 来源默认为01{01：新购、02：调拨、03：接受捐赠、04：置换、05：自建、06：租赁、07：盘盈、08：其他}
     */
    @ExcelProperty(value = "来源")
    private String source;

    /**
     * 默认为0{0：库存、1：在用、2：借用、3：维修中、4：调拨中、5：报废中、6：处置中、7：报废}
     */
    @ExcelProperty(value = "资产状态")
    private String status;

    /**
     * ：人民币：人民币：、欧元：欧元、美元：美元、法元：法元
     */
    @ExcelProperty(value = "货币单位")
    private String monetaryUnit;

}
